package com.syni.mdd.yhd.common.all.listen.video;

import com.syni.mdd.yhd.common.all.entity.BmsUserVideo;
import com.syni.mdd.yhd.common.all.entity.BmsVideo;
import lombok.Data;
import org.springframework.context.ApplicationEvent;

import java.util.Map;

/**
 * @className VideoEvent
 * @description TOO
 * @Author cfx
 * @DATE 2019/8/7 15:44
 * @VERSION 1.0
 **/
@Data
public class VideoEvent extends ApplicationEvent {
    public final static int USER_RELEASE = 1;
    public final static int BUSINESS_RELEASE = 2;
    public final static int ASSISTANT_RELEASE = 3;
    private BmsVideo bmsVideo;
    private Integer videoReleaseType;
    private BmsUserVideo bmsUserVideo;
    private Integer userId;
    private String userIdentify;
    private Map<String,Object> userData;
    private String latitude;
    private String longitude;
    private String addr;

    public VideoEvent(Object source, BmsVideo bmsVideo,
                      BmsUserVideo bmsUserVideo,Integer videoReleaseType,Map<String,Object> userData) {
        super(source);
        this.bmsVideo = bmsVideo;
        this.videoReleaseType = videoReleaseType;
        this.bmsUserVideo = bmsUserVideo;
        this.userData = userData;
    }

    public VideoEvent(Object source, BmsVideo bmsVideo,Integer userId) {
        super(source);
        this.bmsVideo = bmsVideo;
        this.userId = userId;
    }

    public VideoEvent(Object source, String addr,String longitude,String latitude,String userId) {
        super(source);
        this.addr = addr;
        this.longitude = longitude;
        this.latitude = latitude;
        this.userIdentify = userId;
    }
}
